package com.zmc.lostfound.common.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

import static com.zmc.lostfound.common.constant.RegexConstant.EMAIL_REGEX;

/**
 * @author zmc
 * @description 发送简单邮件传输对象
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class SimpleEmailDTO implements Serializable {

    private static final long serialVersionUID = 2043584815046399737L;

    @NotBlank(message = "QQ邮箱未填写")
    @Pattern(regexp = EMAIL_REGEX, message = "QQ邮箱格式错误")
    private String qqEmail;

    @NotBlank(message = "邮件标题未填写")
    private String title;

    @NotBlank(message = "邮件正文未填写")
    private String text;

}
